package com.yeban.pattem.proxy.statics;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/11/5
 */
public class StaticBankService implements IService{

    private IService target;

    public StaticBankService(IService target) {
        this.target = target;
    }

    @Override
    public void login(Long id, String pwd) {
        System.out.println("开始日志追踪：The Method login begin with [id = " + id + ", pwd = " + pwd + "]");
        long l1 = System.currentTimeMillis();
        target.login(id, pwd);
        long l2 = System.currentTimeMillis();
        System.out.println("结束日志追踪：The Method login end with , 耗时" + (l2-l1) + "ms");

    }

    @Override
    public void register(Long id, String name, String pwd) {
        System.out.println("开始日志追踪：The Method register begin with [id = " + id + ", name = " + name + ", pwd = " + pwd + "]");
        long l1 = System.currentTimeMillis();
        target.register(id, name, pwd);
        long l2 = System.currentTimeMillis();
        System.out.println("结束日志追踪：The Method register end with , 耗时" + (l2-l1) + "ms");
    }
}
